//----------------------------------------------
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(UGUITweenColor))]
public class UGUITweenColorEditor : UGUITweenerEditor
{
	public override void OnInspectorGUI ()
	{
		GUILayout.Space(6f);
		UGUIEditorTools.SetLabelWidth(120f);

		UGUITweenColor tw = target as UGUITweenColor;
		GUI.changed = false;

		Color from = EditorGUILayout.ColorField("From", tw.from);
		Color to = EditorGUILayout.ColorField("To", tw.to);

		if (GUI.changed)
		{
			UGUIEditorTools.RegisterUndo("Tween Change", tw);
			tw.from = from;
			tw.to = to;
			UGUITools.SetDirty(tw);
		}

		DrawCommonProperties();
	}
}
